define(function (require, exports, module) {
    return function (jQuery) {
        (function ($) {
            //获取两个时间差时，返回月、天、小时、分钟
            var getTimeDiffValue = function(time1,time2,fmt){
                var minute = 1000 * 60;
                var hour = minute * 60;
                var day = hour * 24;
                var month = day * 30;

                var diffValue = 0;
                switch(fmt){
                    case 'month':
                        diffValue=(time1-time2)/month;
                        break;
                    case 'day':
                        diffValue=(time1-time2)/day;
                        break;
                    case 'hour':
                        diffValue=(time1-time2)/hour;
                        break;
                    case 'minute':
                        diffValue=(time1-time2)/minute;
                        break;
                    default:
                        break;
                }
                return diffValue;
            };
            //时间格式化
            var dateFormat = function (date, fmt) { //author: meizz
                var o = {
                    "M+": date.getMonth() + 1,                 //月份
                    "d+": date.getDate(),                    //日
                    "h+": date.getHours(),                   //小时
                    "m+": date.getMinutes(),                 //分
                    "s+": date.getSeconds(),                 //秒
                    "q+": Math.floor((date.getMonth() + 3) / 3), //季度
                    "S": date.getMilliseconds()             //毫秒
                };
                if (/(y+)/.test(fmt))
                    fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
                for (var k in o)
                    if (new RegExp("(" + k + ")").test(fmt))
                        fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
                return fmt;
            };
            /*seajs-content-start*/
            var resourceDispatchctrl = function ($scope, httpservice) {
                $scope.$emit('title', '东莞资源调度模块');
                $(".dispatch-tabs div").live("click",function(e){
                    $(this).addClass("current");
                    $(this).siblings().removeClass().addClass("dispatch-tab");
                    var text = $(this).text();
                    var currentpageid = "#firstpage";
                    switch(text){
                        case '一级页面':
                            currentpageid = "#firstpage";
                            break;
                        case '二级页面':
                            currentpageid = "#secondpage";
                            break;
                        case '三级页面':
                            currentpageid = "#thirdpage";
                            break;
                    }
                    $(currentpageid).show();
                    $(currentpageid).siblings().hide();
                });

                $scope.servicetree = {
                    obj: "",
                    filter: "",
                    data: [
                        {
                            id:1,
                            name:"全选",
                            children:[
                                {id: 1,name: '即时通信'},
                                {id: 2,name: '阅读'},
                                {id: 3,name: '微博'},
                                {id: 4,name: '导航'},
                                {id: 5,name: '视频'},
                                {id: 6,name: '音乐'},
                                {id: 7,name: '应用商店'},
                                {id: 8,name: '游戏'},
                                {id: 9,name: '支付'},
                                {id: 10,name: '动漫'},
                                {id: 11,name: '邮箱'},
                                {id: 12,name: 'P2P业务'},
                                {id: 13,name: 'VoIP业务'},
                                {id: 14,name: '彩信'},
                                {id: 15,name: '浏览下载'},
                                {id: 16,name: '财经'},
                                {id: 17,name: '安全杀毒'},
                                {id: 18,name: '其他业务'}
                            ]
                        }

                    ]
                };
                $scope.netunittree = {
                    obj: "",
                    filter: "",
                    data: [
                        {
                            id:1,
                            name:"全选",
                            children:[
                                {id: 1,name: 'DGSGW1001'},
                                {id: 2,name: 'DGSGW1002'},
                                {id: 3,name: 'DGSGW1003'},
                                {id: 4,name: 'DGSGW1004'},
                                {id: 5,name: 'DGSGW1005'},
                                {id: 6,name: 'DGSGW1006'},
                                {id: 7,name: 'DGSGW1007'},
                                {id: 8,name: 'DGSGW1008'},
                                {id: 9,name: 'DGSGW1009'},
                                {id: 10,name: 'DGSGW1010'},
                                {id: 11,name: 'DGSGW1011'},
                                {id: 12,name: 'DGSGW1012'},
                                {id: 13,name: 'DGSGW1013'},
                                {id: 14,name: 'DGSGW1014'},
                                {id: 15,name: 'DGSGW1015'},
                                {id: 16,name: 'DGSGW1016'},
                                {id: 17,name: 'DGSGW1017'},
                                {id: 18,name: 'DGSGW1018'}
                            ]
                        }

                    ]
                };
                $scope.flowtree = {
                    obj: "",
                    filter: "",
                    data: [
                        {
                            id:1,
                            name:"全选",
                            children:[
                                {id: 1,name: '广东电信网外_电信'},
                                {id: 2,name: '广西电信网外_电信'},
                                {id: 3,name: '福建电信网外_电信'},
                                {id: 4,name: '黑龙江电信网外_电信'},
                                {id: 5,name: '中国电信网外_电信'},
                                {id: 6,name: '河南电信网外_电信'},
                                {id: 4,name: '湖北电信网外_电信'},
                                {id: 5,name: '湖南电信网外_电信'},
                                {id: 6,name: '上海电信网外_电信'}
                            ]
                        }
                    ]
                };

                /*一级页面*/
                $scope.firstdimentree = {
                    obj: "",
                    filter: "",
                    data: [
                        {
                            id:1,
                            name:"维度",
                            children:[
                                {id: 1,name: '业务'},
                                {id: 2,name: '网元'},
                                {id: 3,name: '流向'}
                            ]
                        }

                    ]
                };
                $scope.firstindicatortree = {
                    obj: "",
                    filter: "",
                    data: [
                        {
                            id:1,
                            name:"指标",
                            children:[
                                {id: 1,name: '成功率'},
                                {id: 2,name: '速率'}
                            ]
                        }
                    ]
                };
                $scope.firstindicatorgrid = {
                    gridpagedata:{
                        nowpage:1,
                        totalpage:20,
                        totalcount:20,
                        startline:1,
                        endline:20,
                        pagesize:20,
                        pagelist:[10,20,50,100],
                        datacount:20,
                        toFirstpage: function(){
                            //alert('首页');
                            $scope.indicatorgrid.gridpagedata.nowpage = 1;
                            var condition ={
                                pageindex:$scope.indicatorgrid.gridpagedata.nowpage,
                                pagesize:$scope.indicatorgrid.gridpagedata.pagesize,
                                starttime:$("#starttime").val(),
                                endtime:$("#endtime").val(),
                                timesize:$scope.timesize,
                                dimension:$scope.dimension
                            }
                            $scope.indicatorGridturnPage(condition);
                        },
                        toToppage: function(){
                            //alert('上一页');
                            if ($scope.indicatorgrid.gridpagedata.nowpage > 1) {
                                $scope.indicatorgrid.gridpagedata.nowpage--;
                                var condition ={
                                    pageindex:$scope.indicatorgrid.gridpagedata.nowpage,
                                    pagesize:$scope.indicatorgrid.gridpagedata.pagesize,
                                    starttime:$("#starttime").val(),
                                    endtime:$("#endtime").val(),
                                    timesize:$scope.timesize,
                                    dimension:$scope.dimension
                                }
                                $scope.indicatorGridturnPage(condition);
                            }
                        },
                        toNextpage: function(){
                            //alert('下一页');
                            if ($scope.indicatorgrid.gridpagedata.nowpage < $scope.indicatorgrid.gridpagedata.totalpage) {
                                $scope.indicatorgrid.gridpagedata.nowpage++;
                                var condition ={
                                    pageindex:$scope.indicatorgrid.gridpagedata.nowpage,
                                    pagesize:$scope.indicatorgrid.gridpagedata.pagesize,
                                    starttime:$("#starttime").val(),
                                    endtime:$("#endtime").val(),
                                    timesize:$scope.timesize,
                                    dimension:$scope.dimension
                                }
                                $scope.indicatorGridturnPage(condition);
                            }
                        },
                        toLastpage: function(){
                            //alert('最后一页');
                            $scope.indicatorgrid.gridpagedata.nowpage = $scope.indicatorgrid.gridpagedata.totalpage;
                            var condition ={
                                pageindex:$scope.indicatorgrid.gridpagedata.nowpage,
                                pagesize:$scope.indicatorgrid.gridpagedata.pagesize,
                                starttime:$("#starttime").val(),
                                endtime:$("#endtime").val(),
                                timesize:$scope.timesize,
                                dimension:$scope.dimension
                            }
                            $scope.indicatorGridturnPage(condition);
                        },
                        topage: function(){
                            //alert('第' + $scope.grid1.gridpagedata.nowpage + '页');
                            var condition ={
                                pageindex:$scope.indicatorgrid.gridpagedata.nowpage,
                                pagesize:$scope.indicatorgrid.gridpagedata.pagesize,
                                starttime:$("#starttime").val(),
                                endtime:$("#endtime").val(),
                                timesize:$scope.timesize,
                                dimension:$scope.dimension
                            }
                            $scope.indicatorGridturnPage(condition);
                        },
                        changePagesize: function(){
                            //alert('切换到每页' + $scope.grid1.gridpagedata.pagesize + '条');
                            $scope.indicatorgrid.gridpagedata.nowpage = 1;
                            var condition ={
                                pageindex:$scope.indicatorgrid.gridpagedata.nowpage,
                                pagesize:$scope.indicatorgrid.gridpagedata.pagesize,
                                starttime:$("#starttime").val(),
                                endtime:$("#endtime").val(),
                                timesize:$scope.timesize,
                                dimension:$scope.dimension
                            }
                            $scope.indicatorGridturnPage(condition);
                        }
                    },
                    griddata: {
                        colnames: [ "比较日期",'查询日期','业务','流向','权重波动','调度量','a值贡献度','速率','速率变化值','速率变化率'],
                        colmodel: [
                            { name: 'comparetime', index: 'comparetime', sortable: true, align:"center"},
                            { name: 'querytime', index: 'querytime', sortable: true,align:"center" },
                            { name: 'service', index: 'service', sortable: true, align:"center"},
                            { name: 'flow', index: 'flow', sortable: true, align:"center"},
                            { name: 'weightwave', index: 'weightwave', sortable: true, align:"center"},
                            { name: 'dispatchvalue', index: 'dispatchvalue', sortable: true, align:"center"},
                            { name: 'avalue', index: 'avalue', sortable: true, align:"center"},
                            { name: 'rate', index: 'rate', sortable: true, align:"center"},
                            { name: 'ratechangevalue', index: 'ratechangevalue', sortable: true, align:"center"},
                            { name: 'ratechangepercent', index: 'ratechangepercent', sortable: true, align:"center"}
                        ],
                        data: [
                            { "comparetime": "2017-04-04", "querytime": "2017-04-05", "service":"视频", "flow": "外网-联通","weightwave": "96.98","dispatchvalue":"98.99"},
                            { "comparetime": "2017-04-04", "querytime": "2017-04-05", "service":"浏览", "flow": "外网-联通","weightwave": "96.98","dispatchvalue":"98.99"}
                        ]
                    },
                    obj:{},
                    shrinkToFit:true,
                    gridresize: function (grid) {
                        grid.setGridWidth(parseInt($(window).width()-58));
                        grid.setGridHeight(parseInt(($(window).height()-257)));
                    }
                };
                /*二级页面*/
                $scope.seconddimentree1 = {
                    obj: "",
                    filter: "",
                    data: [
                        {
                            id:1,
                            name:"维度",
                            children:[
                                {id: 1,name: '业务'},
                                {id: 2,name: '网元'},
                                {id: 3,name: '流向'}
                            ]
                        }

                    ]
                };
                $scope.seconddimentree2 = {
                    obj: "",
                    filter: "",
                    data: [
                        {
                            id:1,
                            name:"视频",
                            children:[
                                {id: 1,name: '腾讯视频'},
                                {id: 2,name: '爱奇艺'},
                                {id: 3,name: '百度视频'}
                            ]
                        }

                    ]
                };
                $scope.secondindicatortree = {
                    obj: "",
                    filter: "",
                    data: [
                        {
                            id:1,
                            name:"指标",
                            children:[
                                {id: 1,name: '成功率'},
                                {id: 2,name: '速率'}
                            ]
                        }
                    ]
                };
                $scope.secondindicatorgrid = {
                    gridpagedata:{
                        nowpage:1,
                        totalpage:20,
                        totalcount:20,
                        startline:1,
                        endline:20,
                        pagesize:20,
                        pagelist:[10,20,50,100],
                        datacount:20,
                        toFirstpage: function(){
                            //alert('首页');
                            $scope.indicatorgrid.gridpagedata.nowpage = 1;
                            var condition ={
                                pageindex:$scope.indicatorgrid.gridpagedata.nowpage,
                                pagesize:$scope.indicatorgrid.gridpagedata.pagesize,
                                starttime:$("#starttime").val(),
                                endtime:$("#endtime").val(),
                                timesize:$scope.timesize,
                                dimension:$scope.dimension
                            }
                            $scope.indicatorGridturnPage(condition);
                        },
                        toToppage: function(){
                            //alert('上一页');
                            if ($scope.indicatorgrid.gridpagedata.nowpage > 1) {
                                $scope.indicatorgrid.gridpagedata.nowpage--;
                                var condition ={
                                    pageindex:$scope.indicatorgrid.gridpagedata.nowpage,
                                    pagesize:$scope.indicatorgrid.gridpagedata.pagesize,
                                    starttime:$("#starttime").val(),
                                    endtime:$("#endtime").val(),
                                    timesize:$scope.timesize,
                                    dimension:$scope.dimension
                                }
                                $scope.indicatorGridturnPage(condition);
                            }
                        },
                        toNextpage: function(){
                            //alert('下一页');
                            if ($scope.indicatorgrid.gridpagedata.nowpage < $scope.indicatorgrid.gridpagedata.totalpage) {
                                $scope.indicatorgrid.gridpagedata.nowpage++;
                                var condition ={
                                    pageindex:$scope.indicatorgrid.gridpagedata.nowpage,
                                    pagesize:$scope.indicatorgrid.gridpagedata.pagesize,
                                    starttime:$("#starttime").val(),
                                    endtime:$("#endtime").val(),
                                    timesize:$scope.timesize,
                                    dimension:$scope.dimension
                                }
                                $scope.indicatorGridturnPage(condition);
                            }
                        },
                        toLastpage: function(){
                            //alert('最后一页');
                            $scope.indicatorgrid.gridpagedata.nowpage = $scope.indicatorgrid.gridpagedata.totalpage;
                            var condition ={
                                pageindex:$scope.indicatorgrid.gridpagedata.nowpage,
                                pagesize:$scope.indicatorgrid.gridpagedata.pagesize,
                                starttime:$("#starttime").val(),
                                endtime:$("#endtime").val(),
                                timesize:$scope.timesize,
                                dimension:$scope.dimension
                            }
                            $scope.indicatorGridturnPage(condition);
                        },
                        topage: function(){
                            //alert('第' + $scope.grid1.gridpagedata.nowpage + '页');
                            var condition ={
                                pageindex:$scope.indicatorgrid.gridpagedata.nowpage,
                                pagesize:$scope.indicatorgrid.gridpagedata.pagesize,
                                starttime:$("#starttime").val(),
                                endtime:$("#endtime").val(),
                                timesize:$scope.timesize,
                                dimension:$scope.dimension
                            }
                            $scope.indicatorGridturnPage(condition);
                        },
                        changePagesize: function(){
                            //alert('切换到每页' + $scope.grid1.gridpagedata.pagesize + '条');
                            $scope.indicatorgrid.gridpagedata.nowpage = 1;
                            var condition ={
                                pageindex:$scope.indicatorgrid.gridpagedata.nowpage,
                                pagesize:$scope.indicatorgrid.gridpagedata.pagesize,
                                starttime:$("#starttime").val(),
                                endtime:$("#endtime").val(),
                                timesize:$scope.timesize,
                                dimension:$scope.dimension
                            }
                            $scope.indicatorGridturnPage(condition);
                        }
                    },
                    griddata: {
                        colnames: [ "比较日期",'查询日期','业务','流向','权重波动','调度量','a值贡献度','速率','速率变化值','速率变化率'],
                        colmodel: [
                            { name: 'comparetime', index: 'comparetime', sortable: true, align:"center"},
                            { name: 'querytime', index: 'querytime', sortable: true,align:"center" },
                            { name: 'service', index: 'service', sortable: true, align:"center"},
                            { name: 'flow', index: 'flow', sortable: true, align:"center"},
                            { name: 'weightwave', index: 'weightwave', sortable: true, align:"center"},
                            { name: 'dispatchvalue', index: 'dispatchvalue', sortable: true, align:"center"},
                            { name: 'avalue', index: 'avalue', sortable: true, align:"center"},
                            { name: 'rate', index: 'rate', sortable: true, align:"center"},
                            { name: 'ratechangevalue', index: 'ratechangevalue', sortable: true, align:"center"},
                            { name: 'ratechangepercent', index: 'ratechangepercent', sortable: true, align:"center"}
                        ],
                        data: [
                            { "comparetime": "2017-04-04", "querytime": "2017-04-05", "service":"视频", "flow": "外网-联通","weightwave": "96.98","dispatchvalue":"98.99"},
                            { "comparetime": "2017-04-04", "querytime": "2017-04-05", "service":"浏览", "flow": "外网-联通","weightwave": "96.98","dispatchvalue":"98.99"}
                        ]
                    },
                    obj:{},
                    shrinkToFit:true,
                    gridresize: function (grid) {
                        grid.setGridWidth(parseInt($(window).width()-58));
                        grid.setGridHeight(parseInt(($(window).height()-257)));
                    }
                };
                /*三级页面*/
                $scope.thirddimentree1 = {
                    obj: "",
                    filter: "",
                    data: [
                        {
                            id:1,
                            name:"维度",
                            children:[
                                {id: 1,name: '业务'},
                                {id: 2,name: '网元'},
                                {id: 3,name: '流向'}
                            ]
                        }

                    ]
                };
                $scope.thirddimentree2 = {
                    obj: "",
                    filter: "",
                    data: [
                        {
                            id:1,
                            name:"视频",
                            children:[
                                {id: 1,name: '腾讯视频'},
                                {id: 2,name: '爱奇艺'},
                                {id: 3,name: '百度视频'}
                            ]
                        }

                    ]
                };
                $scope.thirddimentree3 = {
                    obj: "",
                    filter: "",
                    data: [
                        {
                            id:1,
                            name:"腾讯视频",
                            children:[
                                {id: 1,name: '10.203.90.78'},
                                {id: 2,name: 'www.ddck.com'},
                                {id: 3,name: 'www.jjij.com'}
                            ]
                        }

                    ]
                };
                $scope.thirdindicatortree = {
                    obj: "",
                    filter: "",
                    data: [
                        {
                            id:1,
                            name:"指标",
                            children:[
                                {id: 1,name: '成功率'},
                                {id: 2,name: '速率'}
                            ]
                        }
                    ]
                };
                $scope.thirdindicatorgrid = {
                    gridpagedata:{
                        nowpage:1,
                        totalpage:20,
                        totalcount:20,
                        startline:1,
                        endline:20,
                        pagesize:20,
                        pagelist:[10,20,50,100],
                        datacount:20,
                        toFirstpage: function(){
                            //alert('首页');
                            $scope.indicatorgrid.gridpagedata.nowpage = 1;
                            var condition ={
                                pageindex:$scope.indicatorgrid.gridpagedata.nowpage,
                                pagesize:$scope.indicatorgrid.gridpagedata.pagesize,
                                starttime:$("#starttime").val(),
                                endtime:$("#endtime").val(),
                                timesize:$scope.timesize,
                                dimension:$scope.dimension
                            }
                            $scope.indicatorGridturnPage(condition);
                        },
                        toToppage: function(){
                            //alert('上一页');
                            if ($scope.indicatorgrid.gridpagedata.nowpage > 1) {
                                $scope.indicatorgrid.gridpagedata.nowpage--;
                                var condition ={
                                    pageindex:$scope.indicatorgrid.gridpagedata.nowpage,
                                    pagesize:$scope.indicatorgrid.gridpagedata.pagesize,
                                    starttime:$("#starttime").val(),
                                    endtime:$("#endtime").val(),
                                    timesize:$scope.timesize,
                                    dimension:$scope.dimension
                                }
                                $scope.indicatorGridturnPage(condition);
                            }
                        },
                        toNextpage: function(){
                            //alert('下一页');
                            if ($scope.indicatorgrid.gridpagedata.nowpage < $scope.indicatorgrid.gridpagedata.totalpage) {
                                $scope.indicatorgrid.gridpagedata.nowpage++;
                                var condition ={
                                    pageindex:$scope.indicatorgrid.gridpagedata.nowpage,
                                    pagesize:$scope.indicatorgrid.gridpagedata.pagesize,
                                    starttime:$("#starttime").val(),
                                    endtime:$("#endtime").val(),
                                    timesize:$scope.timesize,
                                    dimension:$scope.dimension
                                }
                                $scope.indicatorGridturnPage(condition);
                            }
                        },
                        toLastpage: function(){
                            //alert('最后一页');
                            $scope.indicatorgrid.gridpagedata.nowpage = $scope.indicatorgrid.gridpagedata.totalpage;
                            var condition ={
                                pageindex:$scope.indicatorgrid.gridpagedata.nowpage,
                                pagesize:$scope.indicatorgrid.gridpagedata.pagesize,
                                starttime:$("#starttime").val(),
                                endtime:$("#endtime").val(),
                                timesize:$scope.timesize,
                                dimension:$scope.dimension
                            }
                            $scope.indicatorGridturnPage(condition);
                        },
                        topage: function(){
                            //alert('第' + $scope.grid1.gridpagedata.nowpage + '页');
                            var condition ={
                                pageindex:$scope.indicatorgrid.gridpagedata.nowpage,
                                pagesize:$scope.indicatorgrid.gridpagedata.pagesize,
                                starttime:$("#starttime").val(),
                                endtime:$("#endtime").val(),
                                timesize:$scope.timesize,
                                dimension:$scope.dimension
                            }
                            $scope.indicatorGridturnPage(condition);
                        },
                        changePagesize: function(){
                            //alert('切换到每页' + $scope.grid1.gridpagedata.pagesize + '条');
                            $scope.indicatorgrid.gridpagedata.nowpage = 1;
                            var condition ={
                                pageindex:$scope.indicatorgrid.gridpagedata.nowpage,
                                pagesize:$scope.indicatorgrid.gridpagedata.pagesize,
                                starttime:$("#starttime").val(),
                                endtime:$("#endtime").val(),
                                timesize:$scope.timesize,
                                dimension:$scope.dimension
                            }
                            $scope.indicatorGridturnPage(condition);
                        }
                    },
                    griddata: {
                        colnames: [ "比较日期",'查询日期','业务','流向','权重波动','调度量','a值贡献度','速率','速率变化值','速率变化率'],
                        colmodel: [
                            { name: 'comparetime', index: 'comparetime', sortable: true, align:"center"},
                            { name: 'querytime', index: 'querytime', sortable: true,align:"center" },
                            { name: 'service', index: 'service', sortable: true, align:"center"},
                            { name: 'flow', index: 'flow', sortable: true, align:"center"},
                            { name: 'weightwave', index: 'weightwave', sortable: true, align:"center"},
                            { name: 'dispatchvalue', index: 'dispatchvalue', sortable: true, align:"center"},
                            { name: 'avalue', index: 'avalue', sortable: true, align:"center"},
                            { name: 'rate', index: 'rate', sortable: true, align:"center"},
                            { name: 'ratechangevalue', index: 'ratechangevalue', sortable: true, align:"center"},
                            { name: 'ratechangepercent', index: 'ratechangepercent', sortable: true, align:"center"}
                        ],
                        data: [
                            { "comparetime": "2017-04-04", "querytime": "2017-04-05", "service":"视频", "flow": "外网-联通","weightwave": "96.98","dispatchvalue":"98.99"},
                            { "comparetime": "2017-04-04", "querytime": "2017-04-05", "service":"浏览", "flow": "外网-联通","weightwave": "96.98","dispatchvalue":"98.99"}
                        ]
                    },
                    obj:{},
                    shrinkToFit:true,
                    gridresize: function (grid) {
                        grid.setGridWidth(parseInt($(window).width()-58));
                        grid.setGridHeight(parseInt(($(window).height()-257)));
                    }
                };

                $scope.init = function () {
                    setTimeout(function(){
                        $scope.$apply($scope.expand = function(){
                            var treeObj = $.fn.zTree.getZTreeObj("servicetree");
                            treeObj.expandAll(true);

                            treeObj = $.fn.zTree.getZTreeObj("netunittree");
                            treeObj.expandAll(true);

                            treeObj = $.fn.zTree.getZTreeObj("flowtree");
                            treeObj.expandAll(true);
                        });
                    }, 1000);
                }
                $scope.init();
            }
            angular.module('resourceDispatch-ctrl', [])
                .controller('ResourceDispatchCtrl', ['$scope', 'HttpService', resourceDispatchctrl])
            /*seajs-content-end*/
        })(jQuery);
    }
});